package com.zyh.hotel.dao;


import com.zyh.hotel.model.Room;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import javax.transaction.Transactional;

public interface RoomDao extends JpaRepository<Room,Integer> {
        void deleteById(int id);
        

        @Modifying
        @Transactional
        @Query(value="update room set fix = ?1 ,health = ?2, peo = ?3, status=?4, type=?5, where id = ?6", nativeQuery = true)
        Integer update(String fix,String health,String peo,String status,String type,int id);
}
